package com.cckj.common.event;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

/**
  * @Description //TODO  事件发布器
  * @Author wjq
  * @time: 2020/11/7 11:38
  */
@Slf4j
@Component
@AllArgsConstructor
public class EventPublisher {

    @Autowired
    private final ApplicationEventPublisher applicationEventPublisher;

    public void publishEvent(BusinessEvent event){
        applicationEventPublisher.publishEvent(event);
    }
}
